package designMode.commandPattern;

/**
 * @ClassName LightOnCommand
 * @Description 灯具关
 * @Author LIBOFEI
 * @Date 2020/6/24 21:47
 * @Version 1.0
 **/
public class LightOffCommand implements Command {

    Light light;

    public LightOffCommand(Light light){
        this.light = light;
    }

    @Override
    public void execute() {
        light.off();
    }

    @Override
    public void undo() {
        light.on();
    }
}
